package com.nbsaas.boot.marketing.rest.convert;

import com.nbsaas.boot.marketing.data.entity.Coupon;
import com.nbsaas.boot.marketing.api.domain.simple.CouponSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 优惠券-列表对象转换器
*/

public class CouponSimpleConvert implements Converter<CouponSimple, Coupon> {




@Override
public CouponSimple convert(Coupon source) {
    CouponSimple result = new CouponSimple();

                result.setMinAmount(source.getMinAmount());
                result.setCode(source.getCode());
                result.setDescription(source.getDescription());
                result.setType(source.getType());
                result.setTotalCount(source.getTotalCount());
                result.setAddDate(source.getAddDate());
                result.setMaxDiscount(source.getMaxDiscount());
                result.setTerms(source.getTerms());
                result.setName(source.getName());
                result.setDiscountType(source.getDiscountType());
                result.setStartTime(source.getStartTime());
                result.setEndTime(source.getEndTime());
                result.setId(source.getId());
                result.setDiscountValue(source.getDiscountValue());
                result.setUsedCount(source.getUsedCount());
                result.setPerLimit(source.getPerLimit());
                result.setValidDays(source.getValidDays());
                result.setStatus(source.getStatus());
                result.setLastDate(source.getLastDate());


    return result;
}

}